Skip to content

My MathGame Submission#698

Closed
awerner9 wants to merge 2 commits into
the-csharp-academy:mainfrom
awerner9:main
Closed

My MathGame Submission#698
awerner9 wants to merge 2 commits into
the-csharp-academy:mainfrom
awerner9:main

Conversation

@awerner9
Copy link
Copy Markdown

No description provided.

@TheCSharpAcademy
Copy link
Copy Markdown
Collaborator

@awerner9 Project approved! 😄✅ It's a shame you didn't complete the challenges this time. 😟 It's always a good use of your time. But nothing stops you from revisiting the project later.

🥋And congratulations! You got your green belt!! 🟩🟩 Roll-up your sleeves, it's just the start 😂

Feedback
🔍️I highly recommend you learn about the DRY Principle (Don't Repeat Yourself) . It's the most important challenge in this project. Your code is neatly organized but there's a lot of repetition for the games. You should be able to have all games using just one method.

🔍️Your menu is a bit verbose. A switch statement would be way more elegant. It's better suited for conditionals with multiple candidates.

image

🔍️When using console UIs, always make sure you clear the screen often or it gets cluttered quickly:
image

🔍️Use int.TryParse instead of int.Parse: Right now, if the user types "abc" as an answer, the app will crash. This is the biggest improvement I recommend.

🔍️Avoid calling Menu(results) recursively: Each game method calls the menu again. It works for small console apps, but over time this can build up unnecessary call stack depth. A while loop in Main is a cleaner structure.

Overall good work!✋🏻Looking forward to seeing your next projects!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants